import 'package:winkai/generated/json/base/json_field.dart';
import 'package:winkai/generated/json/user_info.g.dart';
import 'dart:convert';

@JsonSerializable()
class UserInfo {
  String id = '';
  String? nickname;
  String? avatar;
  @JSONField(name: "device_id")
  String deviceId = '';
  String? token;

  UserInfo();

  factory UserInfo.fromJson(Map<String, dynamic> json) =>
      $UserInfoFromJson(json);

  Map<String, dynamic> toJson() => $UserInfoToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
